package myzzyl.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import myzzyl.domain.pojo.Room;
import myzzyl.domain.vo.BedVo;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.io.Serial;
import java.util.List;

/**
* @author 33249
* @description 针对表【room】的数据库操作Mapper
* @createDate 2025-08-07 20:07:33
* @Entity generator.domain.Room
*/
public interface RoomMapper extends BaseMapper<Room> {



    List<BedVo> getAllBedVo(Long id);


    @Select("select id, code, sort, type_name, floor_id, create_time, update_time, is_deleted, " +
            "create_by, update_by, remark from room where code = #{code}")
    Room selectByCode(String code);

    @Update("update room set is_deleted = 0 where id = #{id}")
    Boolean updateRoom(Long id);

}




